<?php

namespace app\api\controller;

use app\common\controller\Api;

/**
 * 首页接口
 */

class Index extends Api
{
    protected $noNeedLogin = ['*'];
    protected $noNeedRight = ['*'];

    /**
     * 首页
     *
     */
    public function index()
    {
        $this->success('请求成功');
    }

    /**
     * 获取配方理念列表
     * @ApiMethod   (GET)
     * @ApiRoute    (/api/index/getRecipeList)
     */
    public function getRecipeList(\app\common\model\RecipeModel $RecipeModel)
    {
        $return = $RecipeModel->getList();
        $this->success($return['msg'],$return['data'],$return['code']);
    }

    /**
     * 获取热卖产品列表
     * @ApiMethod   (GET)
     * @ApiRoute    (/api/index/getHotproductList)
     */
    public function getHotproductList(\app\common\model\HotproductModel $HotproductModel)
    {
        $return = $HotproductModel->getList();
        $this->success($return['msg'],$return['data'],$return['code']);
    }
}
